For matching a grayscale image to a reference image of a binary gradation, there is a method by which the grayscale image is binarized only one time by using a certain binarization algorithm and a template matching is performed between the binary patterns. As an example of the binarization algorithm, the fixed threshold method, p-tile method, and Otsu binarization (a discriminant analysis method) are known. In those methods, there is an advantage that the processing speed is relatively high because the binarizing operation is performed only one time. However, in the binarizing algorithm, prerequisites peculiar for each of the input grayscale images are assumed. Thus, a desired result is obtained only in limited cases.
For example, in the fixed threshold method, an assumed prerequisite is that the density values of the recognition target object region and the density values of the other region can always be discriminated at a stable value (the value is called as a binarization threshold). Thus, in the case of an image whose pixel values are entirely increased or decreased depending on the change in an illumination magnitude, the optimal binarization threshold is increased or decreased so that the fixed threshold method is not suitable for.
In the p-tile method, a prerequisite is that the region formed by the pixels of higher p percent or lower p percent in the pixel value distribution for the entire image is assumed to correspond to the recognition target. If the size of the recognition target in the input grayscale image is changed, for example, the prerequisite is not satisfied so that the p-tile method is not suitable.
In the Otsu binarization method, the histogram of the pixel values in the entire image is assumed to exhibit the shape of two peaks. However, when three or more objects exist in an input image, the histogram does not exhibit the shape of the two peaks in very many cases so that the Otsu binarization method is not suitable for.
A method having looser prerequisites than the foregoing methods is provided. In this method, an input grayscale image is binarized in accordance with a plurality of different thresholds respectively. The respective binarized input images are compared with a reference image to be selected as a final output.
For example, in the method described in Japanese Laid Open Patent Application JP-A-Heisei, 8-287246 (refer to paragraphs [0013] to [0028] and FIG. 1), a plurality of threshold setting methods, such as the p-tile method and the like, are used to generate a plurality of binary images, and the image having the highest evaluation value is selected in accordance with the character recognition for each of them.
In a character recognizing apparatus described in Japanese Laid Open Patent Application JP-A-Heisei, 8-077300 (refer to paragraphs [0073] to [0022] and FIG. 1), until the certainty degree of a character recognition exceeds a predetermined threshold, the binarization threshold is automatically incremented or decremented by a micro amount from an initial value, and the trial and error are repeated, thereby obtaining a desired result.
Also, the following method (referred to as a binary image round-robin method) may be considered. In this method, various settable binarization thresholds are assumed, and the binary images based on the respective binarization thresholds are generated. The distances between the binary images and a reference image are calculated, and the recognition result having the minimum distance value is employed. According to this binary image generation round-robin method, irrespectively of the nature of the input grayscale image, the input grayscale image can be optimally adapted to the reference image. Thus, the highest recognition precision can be attained as compared with the foregoing conventional techniques.
Japanese Laid Open Patent Application JP-P 2004-180000A describes a binarizing method of an image that is intended to automatically binarizing a grayscale image at a high precision.
In Japanese Laid Open Patent Application JP-P 2000-40153A, a binarizing method of an image is described. In this method, the fact that the ruled line and the character have concentrations different from the background color is used, and even if any color is used in the ruled-line, the character and the background, the character and the ruled line are clearly displayed.